package end.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import end.bean.shiro.Role;

/**
 * 
 * ManagerDAO.java 2016-6-24
 * 
 * Copyright zhaocj Inc. All rights reserved. Love Me Like Love Justin Bieber
 */
@Repository
public interface RoleDAO<T> extends BaseMapper<T> {
	public List<T> queryRolesByManagerId(@Param("id") Integer id);

	public Integer[] queryRoleRightsByManager(Integer id);

	public boolean saveRoleAuthByManager(@Param("roleID") Integer[] roleID,
                                         @Param("managerID") Integer managerID);

	public Integer isRoleCodeAlreadyUsed(Role role);

	public boolean modifyRole(Role role);
}
